package com.grass.p019lv.databinding;

import android.graphics.drawable.Drawable;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.Toolbar;
import androidx.databinding.DataBindingComponent;
import androidx.databinding.ViewDataBinding;
import androidx.databinding.adapters.ViewBindingAdapter;
import androidx.viewpager.widget.ViewPager;
import com.androidsa.bttsddka.R;
import com.grass.p019lv.activity.SearchLabelActivity;
import com.grass.p019lv.generated.callback.OnClickListener;

/* renamed from: com.grass.lv.databinding.ActivitySearchLabelBindingImpl */
public class ActivitySearchLabelBindingImpl extends ActivitySearchLabelBinding implements OnClickListener.Listener {
    private static final ViewDataBinding.IncludedLayouts sIncludes = null;
    private static final SparseIntArray sViewsWithIds;
    private final View.OnClickListener mCallback22;
    private final View.OnClickListener mCallback23;
    private final View.OnClickListener mCallback24;
    private long mDirtyFlags;
    private final LinearLayout mboundView0;
    private final AppCompatImageView mboundView1;
    private final TextView mboundView2;
    private final TextView mboundView3;

    /* access modifiers changed from: protected */
    @Override // androidx.databinding.ViewDataBinding
    public boolean onFieldChange(int i, Object obj, int i2) {
        return false;
    }

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        sViewsWithIds = sparseIntArray;
        sparseIntArray.put(R.id.toolbar, 4);
        sViewsWithIds.put(R.id.tv_title, 5);
        sViewsWithIds.put(R.id.vp, 6);
    }

    public ActivitySearchLabelBindingImpl(DataBindingComponent dataBindingComponent, View view) {
        this(dataBindingComponent, view, mapBindings(dataBindingComponent, view, 7, sIncludes, sViewsWithIds));
    }

    private ActivitySearchLabelBindingImpl(DataBindingComponent dataBindingComponent, View view, Object[] objArr) {
        super(dataBindingComponent, view, 0, (Toolbar) objArr[4], (TextView) objArr[5], (ViewPager) objArr[6]);
        this.mDirtyFlags = -1;
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.mboundView0 = linearLayout;
        linearLayout.setTag(null);
        AppCompatImageView appCompatImageView = (AppCompatImageView) objArr[1];
        this.mboundView1 = appCompatImageView;
        appCompatImageView.setTag(null);
        TextView textView = (TextView) objArr[2];
        this.mboundView2 = textView;
        textView.setTag(null);
        TextView textView2 = (TextView) objArr[3];
        this.mboundView3 = textView2;
        textView2.setTag(null);
        setRootTag(view);
        this.mCallback23 = new OnClickListener(this, 2);
        this.mCallback24 = new OnClickListener(this, 3);
        this.mCallback22 = new OnClickListener(this, 1);
        invalidateAll();
    }

    @Override // androidx.databinding.ViewDataBinding
    public void invalidateAll() {
        synchronized (this) {
            this.mDirtyFlags = 4;
        }
        requestRebind();
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean hasPendingBindings() {
        synchronized (this) {
            if (this.mDirtyFlags != 0) {
                return true;
            }
            return false;
        }
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean setVariable(int i, Object obj) {
        if (140 == i) {
            setPosition((Integer) obj);
        } else if (34 != i) {
            return false;
        } else {
            setClick((SearchLabelActivity.OnClick) obj);
        }
        return true;
    }

    @Override // com.grass.p019lv.databinding.ActivitySearchLabelBinding
    public void setPosition(Integer num) {
        this.mPosition = num;
        synchronized (this) {
            this.mDirtyFlags |= 1;
        }
        notifyPropertyChanged(140);
        super.requestRebind();
    }

    @Override // com.grass.p019lv.databinding.ActivitySearchLabelBinding
    public void setClick(SearchLabelActivity.OnClick onClick) {
        this.mClick = onClick;
        synchronized (this) {
            this.mDirtyFlags |= 2;
        }
        notifyPropertyChanged(34);
        super.requestRebind();
    }

    /* access modifiers changed from: protected */
    @Override // androidx.databinding.ViewDataBinding
    public void executeBindings() {
        long j;
        int i;
        Drawable drawable;
        long j2;
        long j3;
        long j4;
        long j5;
        synchronized (this) {
            j = this.mDirtyFlags;
            this.mDirtyFlags = 0;
        }
        Integer num = this.mPosition;
        SearchLabelActivity.OnClick onClick = this.mClick;
        long j6 = j & 5;
        Drawable drawable2 = null;
        int i2 = 0;
        if (j6 != 0) {
            int safeUnbox = ViewDataBinding.safeUnbox(num);
            boolean z = safeUnbox == 0;
            if (safeUnbox == 1) {
                i2 = 1;
            }
            if (j6 != 0) {
                if (z) {
                    j5 = j | 16;
                    j4 = 1024;
                } else {
                    j5 = j | 8;
                    j4 = 512;
                }
                j = j5 | j4;
            }
            if ((j & 5) != 0) {
                if (i2 != 0) {
                    j3 = j | 64;
                    j2 = 256;
                } else {
                    j3 = j | 32;
                    j2 = 128;
                }
                j = j3 | j2;
            }
            TextView textView = this.mboundView2;
            drawable2 = z ? getDrawableFromResource(textView, R.drawable.shape_radius_bg_select) : getDrawableFromResource(textView, R.drawable.shape_radius_bg_unselect);
            int colorFromResource = getColorFromResource(this.mboundView2, R.color.white);
            drawable = i2 != 0 ? getDrawableFromResource(this.mboundView3, R.drawable.shape_radius_bg_select) : getDrawableFromResource(this.mboundView3, R.drawable.shape_radius_bg_unselect);
            i = getColorFromResource(this.mboundView3, R.color.white);
            i2 = colorFromResource;
        } else {
            drawable = null;
            i = 0;
        }
        if ((4 & j) != 0) {
            this.mboundView1.setOnClickListener(this.mCallback22);
            this.mboundView2.setOnClickListener(this.mCallback23);
            this.mboundView3.setOnClickListener(this.mCallback24);
        }
        if ((j & 5) != 0) {
            ViewBindingAdapter.setBackground(this.mboundView2, drawable2);
            this.mboundView2.setTextColor(i2);
            ViewBindingAdapter.setBackground(this.mboundView3, drawable);
            this.mboundView3.setTextColor(i);
        }
    }

    @Override // com.grass.p019lv.generated.callback.OnClickListener.Listener
    public final void _internalCallbackOnClick(int i, View view) {
        boolean z = false;
        boolean z2 = true;
        if (i == 1) {
            SearchLabelActivity.OnClick onClick = this.mClick;
            if (onClick != null) {
                z = true;
            }
            if (z) {
                onClick.btnBack();
            }
        } else if (i == 2) {
            SearchLabelActivity.OnClick onClick2 = this.mClick;
            if (onClick2 == null) {
                z2 = false;
            }
            if (z2) {
                onClick2.selectPosition(0);
            }
        } else if (i == 3) {
            SearchLabelActivity.OnClick onClick3 = this.mClick;
            if (onClick3 != null) {
                z = true;
            }
            if (z) {
                onClick3.selectPosition(1);
            }
        }
    }
}
